﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using XinGuanERP.Attributes.system;
using XinGuanERP.Services.system.IServices;
using XinGuanERP.Utils;

namespace XinGuanERP.Controllers.system
{
    [DynamicApiController]
    public class SysActionLogController
    {
        private readonly ISysActionLogService _sysActionLogService;
        public SysActionLogController(ISysActionLogService sysActionLogService)
        {
            _sysActionLogService = sysActionLogService;
        }
        [Authorize]
        [ServiceFilter(typeof(MyActionFilterAttribute))]
        public ResultUtil GetSysActionLog(int page, int pageSize, string? userId)
            => ResultUtil.ok(_sysActionLogService.GetSysActionLogByPage(page, pageSize, userId));
    }
}
